package smartcrud.spring.models.crud;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import smartcrud.common.orm.Page;
import smartcrud.common.orm.PropertyFilter;

@Service
public class WorldServiceJdbcImpl implements WorldService {
	@Autowired
	private WorldDao worldDao;

	@Override
	public World createWorld(World o) {
		return worldDao.createWorld(o);
	}

	@Override
	public void deleteWorld(Long id) {
		worldDao.deleteWorld(id);
	}

	@Override
	public void updateWorld(World o) {
		worldDao.updateWorld(o);
	}

	@Override
	public World findWorldById(Long id) {
		return worldDao.findWorldById(id);
	}

	@Override
	public List<World> findAllWorlds() {
		return worldDao.findAllWorlds();
	}
	
    @Override
    public int count() {
        return worldDao.count();
    }	

	@Override
	public Page<World> findByPage(Page<World> page, final List<PropertyFilter> filters) {
		return worldDao.findByPage(page,filters);
	}
}
